function x_est = mmse_qr_detector(y, H, SNR)
    % 获取系统大小
    [Nr, Nt] = size(H);
    
    % 构造扩展矩阵
    noise_var = 10^(-SNR/10);
    H_ext = [H; sqrt(noise_var)*eye(Nt)];
    y_ext = [y; zeros(Nt,1)];
    
    % QR分解
    [Q, R] = qr(H_ext);
    
    % 预处理接收信号
    y_tilde = Q' * y_ext;
    
    % 后向替代
    x_est = zeros(Nt, 1);
    for k = Nt:-1:1
        x_est(k) = y_tilde(k);
        for j = k+1:Nt
            x_est(k) = x_est(k) - R(k,j)*x_est(j);
        end
        x_est(k) = x_est(k)/R(k,k);
    end
    
    % 硬判决
    x_est_real = sign(real(x_est));
    x_est_imag = sign(imag(x_est));
    x_est = x_est_real + 1j*x_est_imag;
end 